# Python 异常处理

try:
    print(5/0)
except ZeroDivisionError:
    print("you can not divide by zero!")

# 异常的else代码块
print("Give me two number ,and i will divide them!")
print('Enter "q" to quit!')

while True:
    first_number = input("\nFirst number: ")
    if first_number == 'q':
        break
    second_number = input("Second number: ")
    try:
        answer = int(first_number)/int(second_number)
    except ZeroDivisionError:
        print("you can not divide by 0 !")
    else:
        print(answer)
